/* css 网页布局的基石 ,规定元素在网页中如何显示以及元素间的相互关系 */

body{
    background-color: #f5f5f5;
}
/* 版心居中 */
.w{
    width: 1226px;
    margin: 0 auto;
}
.wrapTopNav{
    background-color: #333;
}
.topNav{
    height: 40px;
    background-color: #333;
    color: #b0b0b0;
    font-size: 12px;
    line-height: 40px;
}
.topNav .navBar{
    float: left;
}
.topNav .navBar li{
    float: left;
}
.topNav .navBar li a{
    padding: 0 7px;
    border-left: 1px solid #3b423b;
}
.topNav .navBar .shop a{
    border-left:0;
    padding-left: 0;
}
.topNav .logBar{
    float: right;
}
.topNav .logBar .logined{
    position: relative;
    display: none;
}
.topNav .logBar .logined:hover{
    background-color: #fff;
}
.topNav .logBar .logined:hover > a{
    display: block;
    background-color: #fff;
    position: relative;
    z-index: 10000;
    border-left:1px solid transparent;
    color: #ff6700;
}
.topNav .logBar .logined:hover .subMenu{
    height: 200px;
}
.topNav .logBar .logined .subMenu{
    position:absolute;
    top: 40px;
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 99999;
    text-align: center;
    box-shadow: 0 1px 1px rgba(0,0,0,0.5);
    color: #424242;
    height: 0;
    overflow: hidden;
    transition: height 0.5s;
}
.topNav .logBar .logined .subMenu li:hover a{
    color: #ff6700;
}
.topNav .logBar > li{
    float: left;
}
.topNav .logBar >li >a{
    padding: 0 7px;
    border-left: 1px solid #3b423b;
}
.topNav .logBar .login a{
    border-left:0;
}
.topNav .logBar .shoppingCar a{
    border-left:0;
}
.topNav .logBar .shoppingCar{
    width: 120px;
    text-align: center;
    background-color: #424242;
    margin-left: 15px;
    position: relative;
}
.topNav .logBar .shoppingCar .showGoods{
    width: 300px;
    height: 0px;
    position: absolute;
    right: 0;
    top: 40px;
    color: #666;
    line-height: 100px;
    /* 阴影效果 */
    box-shadow: 0px 1px 3px rgba(0,0,0,0.5);
    height: 0;
    transition: all 0.5s;
    overflow: hidden;
    background-color: #fff;
    z-index: 999;
}
.topNav .logBar .shoppingCar:hover{
    background-color: #ff6700;
    color: #fff;
}
.topNav .logBar .shoppingCar:hover .showGoods{
    height: 100px;
}

/* wrapNav */
.wrapAll{
    position: relative;
    background-color: #fff;
}
.wrapNav{
    height: 100px;
}
.wrapNav .logo{
    width: 56px;
    height: 56px;
    margin-top: 22px;
}
.wrapNav .logo img{
    width: 100%;
}

.wrapNav .logo,.wrapNav .navBar{
    float: left;
}
.wrapNav .navBar{
    margin-left: 177px;
   
}
.wrapNav .navBar .nav>li{
    float: left;
    line-height: 100px;
    padding: 0 10px;
}

/* position:absolute; 绝对定位 如何查找参照物父元素?
   自当前元素的父元素开始,查找各种定位属性(relative,absoute,fixed),如果能找到则相对于父元素定位,否则继续向上层查找 (父代元素) 依次类推,都找不到则相对于body定位

*/
.wrapNav .navBar:hover .wrapSubNav{
    height: 235px;
   
}
.wrapNav .navBar .wrapSubNav{
    width: 100%;
    position: absolute;
    left: 0;
    top: 100px;
    height: 200px;
    background-color: #fff;
    box-shadow: 0px 1px 4px rgba(0,0,0,0.5);
    height: 0;
    overflow: hidden;
    transition: height 0.3s;
    z-index: 9999;
}
.wrapNav .navBar .wrapSubNav .sub-item>li{
    float: left;
    width: 16.66%;
    text-align: center;
}
.wrapNav .navBar .wrapSubNav .sub-item>li img{
    height: 100px;
    margin-top: 35px;
}
.wrapNav .navBar .wrapSubNav .sub-item>li .title{
    font-size: 12px;
    margin-top: 10px;
}
.wrapNav .navBar .wrapSubNav .sub-item>li .price{
    font-size: 12px;
    margin-top: 10px;
    color: #ff6700;
}

.wrapNav .searchBar{
    float: right;
    width: 296px;
    height: 50px;
    margin-top: 25px;
    position: relative;
}
.wrapNav .searchBar .searchCon{
    width: 243px;
    height: 48px;
    border: 1px solid #e0e0e0;
    outline: none;
    float: left;
    /* 首行缩进 */
    text-indent: 10px;
    transition: border-color 0.5s;
    background: none;
}

/* :focus  状态伪类选择器(css3)  => 用来表示input聚焦时的样式 */
.wrapNav .searchBar .searchCon:focus{
    border-color: #ff6700;
}

.wrapNav .searchBar .searchBtn{
    /* 元素类型转换 */
    display: block;
    width: 50px;
    height: 48px;
    text-align: center;
    line-height: 45px;
    font-size: 24px;
    border: 1px solid #e0e0e0;
    float: left;
    border-left: 0;
    transition: border-color 0.5s;
  
}
.wrapNav .searchBar .searchBtn:hover{
    background-color: #ff6700;
    color: #fff;
}
.wrapNav .searchBar .searchCon:focus + .searchBtn{
    border-color: #ff6700;
}

.searchBar .searchList{
    position: absolute;
    top: 50px;
    left: 0;
    width: 243px;
    border:1px solid #e0e0e0;
    border-top: 0;
    font-size: 12px;
    text-indent: 10px;
    line-height: 28px;
    color: #666;
    opacity: 0;
    transition: border-color 0.5s;
    background-color: #fff;
    z-index: 999;
}

.wrapNav .searchBar .searchCon:focus + .searchBtn + .searchList{
    border-color: #ff6700;
    opacity: 1;
}